package com.jishuo.nontax.bean.vo;

import com.jishuo.nontax.bean.message.SetStatData1DTO;
import com.jishuo.nontax.bean.message.SetStatDataDTO;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;



/**
 * 
 * 
 * @author hlp
 * @email 1459875748@qq.com
 * @date 2023-02-02 10:13:13
 */
@Data
public class StatDataVO implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//区划
	private Long cantonid;
	//银行
	private Long bankid;
	//收款日期
	private String paybankdt;
	//单位
	private Long unitid;
	//项目
	private Long itemid;
	//金额
	private BigDecimal funds;

	private int opttype;
    private int optnum;

    private String cantonname;
    private String bankname;
    private String unitname;
    private String itemname;
    public StatDataVO(){}

	public StatDataVO(SetStatDataDTO bean){
	    if(bean.getBankid()!=0){
            this.bankid =Long.valueOf(bean.getBankid());
        }
        if(bean.getCantonid()!=0){
            this.cantonid=Long.valueOf(bean.getCantonid());
        }
        if(bean.getUnitid()!=0){
            this.unitid=Long.valueOf(bean.getUnitid());

        }
        if(bean.getItemid()!=0){
            this.itemid=Long.valueOf(bean.getItemid());

        }
       this.paybankdt=bean.getPaybankdt();
        if(bean.getFunds()!=null){
            this.funds=new BigDecimal(bean.getFunds());
        }
    }

    public StatDataVO(SetStatData1DTO bean){
        if(bean.getBankid()!=0){
            this.bankid =Long.valueOf(bean.getBankid());
        }
        if(bean.getCantonid()!=0){
            this.cantonid=Long.valueOf(bean.getCantonid());
        }
        this.paybankdt=bean.getPaybankdt();
        this.opttype=bean.getOptType();
        this.optnum = bean.getOptNum();
        if(bean.getFunds()!=null){
            this.funds =new BigDecimal(bean.getFunds());
        }

	}

}
